<template>
  <div class="lbForm">
    <el-form
      ref="ruleFormRef"
      :model="props.ruleForm"
      status-icon
      :rules="rules"
      :label-width="props.labelWidth"
      class="demo-ruleForm"
    >
      <template v-for="item in props.formData" :key="item">
        <el-form-item :label="item.label" :prop="item.prop" v-if="item.flag">
          <slot :name="item.remark"></slot>
        </el-form-item>
        <el-form-item v-if="!item.flag">
            <slot :name="item.remark"></slot>
        </el-form-item>
      </template>
      
    </el-form>
  </div>
</template>

<script setup>
import { ref, reactive ,defineEmits, onMounted } from "vue";
const props = defineProps({
  ruleForm: Array,
  rules: Array,
  labelWidth: String,
  formData: Array,
  ruleFormRef: String,
  SubmitText: String
});
// const emit = defineEmits(['submit'])
const ruleFormRef = ref();
const rules = reactive({ ...props.rules });
</script>

<style>
</style>